package com.ruoyi.bizsys.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.Date;


@Data
public class DeviceContacts extends BaseEntity {
    private static final long serialVersionUID = 1L;


    public DeviceContacts(DeviceContacts oldValue, DeviceContacts newValue) {
        this.callName = oldValue.getCallName();
        this.phone = oldValue.getPhone();
        this.applyNo = oldValue.getApplyNo()+","+newValue.getApplyNo();
        this.deviceId = oldValue.getDeviceId();
    }

    public DeviceContacts() {
    }

    @TableId(type = IdType.AUTO)
    private Long id;

    private String applyNo;

    private String deviceId;

    private String callName;

    private String phone;

    private String actionType;

    private Integer isExclude;

    private String transPhone;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;
}
